package com.itheima.demo;

public class Test4 {
    public static void main(String[] args) {
        //接口
        A a=new A(){
            @Override
            public void show1() {
                System.out.println("show1...");
            }

            @Override
            public void show2() {
                System.out.println("show2...");
            }
        };
        a.show1();
        a.show2();

        //抽象方法
        new B(){

            @Override
            public void absShow() {
                System.out.println("absShow...");
            }
        }.absShow();

        //继承，有静态方法
        new C(){
            @Override
            public void classShow() {
                System.out.println("普通类的普通方法");
            }
        }.classShow();

        C.staticShow();
    }
}

interface A{
    void show1();
    void show2();
}

abstract class B{
    public abstract void absShow();
}

class C{
    public void classShow(){}
    public static void staticShow(){
        System.out.println("...static");
    }
}


